package me.landery.modules.sinco.service;

import me.landery.modules.sinco.domain.Call;
import me.landery.modules.sinco.domain.Recharge;
import me.landery.modules.sinco.service.dto.CallDto;
import me.landery.modules.sinco.service.dto.ReChargeQueryCriteria;
import me.landery.modules.sinco.service.dto.RechargeDto;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;

/**
 * @Author cc.w
 * @Date 2022/6/7 15:42
 * @Version 1.0
 */
public interface RechargeService {
    /**
     * 分页查询
     * @param criteria 条件
     * @param pageable 分页参数
     * @return /
     */
    Map<String,Object> queryAll(ReChargeQueryCriteria criteria, Pageable pageable);

    /**
     * 创建
     * @param resources /
     */
    void create(Recharge resources);


    /**
     * 根据用户ID查询
     * @param id 用户ID
     * @return /
     */
    List<RechargeDto> findByUsersId(Long id);

    void paySuccess(String outTradeNo, String tradeNo);

    void paySuccessAfterNotify(String outTradeNo, String tradeNo, String totalAmount);
    void payFailAfterNotify(String outTradeNo, String tradeNo, String totalAmount);

    List<Recharge> findByUsersIdAndStatus(Long currentUserId, int i);

    void update(Recharge recharge);
}
